Hi,
the problem is the DefineCoordSystem function is only good for 4 axis. To use 5 axis, you have to use DefineCoordSystem6, and set the sixth axis to -1, same as you would with DefineCoordSystem function if not using 4 axis..
The relevant extract from the KMotionDef.h file is -
void DefineCoordSystem(int axisx, int axisy, int axisz, int axisa); // define axis chan numbers to use as x,y,z,a (set -1 to disable)
void DefineCoordSystem6(int axisx, int axisy, int axisz, int axisa, int axisb, int axisc); // define axis chan numbers to use as x,y,z,a,b,c (set -1 to disable)
Moray